﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using ERP.Classes;

namespace ERP.QuanlyKho
{
    public partial class viewERP_canhbaoKho : DevExpress.XtraEditors.XtraForm
    {
        public cs_erp_chitiet_nhapkhoInfo ct = new cs_erp_chitiet_nhapkhoInfo();
        public cs_hmr_usersInfo user = new cs_hmr_usersInfo();
        int count = 0;

        public viewERP_canhbaoKho()
        {
            InitializeComponent();
        }

        private void viewERP_canhbaoKho_Load(object sender, EventArgs e)
        {
            this.Load_Data();
        }

        private void Load_Data()
        {
            DataSet ds = new DataSet("ds");
            //this.hanghoa.Get_List = this.kh.id_kh;
            try
            {
                ds = this.ct.Get_List_Tonkho_canhbao();
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    this.count = 0;
                }
                else
                {
                    this.count = ds.Tables[0].Rows.Count;
                    this.grcDanhsach.DataSource = ds.Tables[0];
                    this.gridView1.ExpandAllGroups();
                }
            }
            catch
            {
                XtraMessageBox.Show("Bạn phải chọn kho hàng!", "Thông báo!");
            }
        }
    }
}